package com.ler.nacosprovider.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lww
 * @date 2019-08-19 11:33
 */
@RestController
public class HelloController {

	private static final Logger log = LoggerFactory.getLogger(HelloController.class);

	@Value("${server.port}")
	private String port;

	@GetMapping("/hello")
	public String hello(@RequestParam String name) {
		log.info("invoked name = " + name);
		return "hello " + name + " port: " + port;
	}
}
